<?php class HeatherItem extends HeatherObject {
	protected function NewBlock ($FirstLine = '') {
		$this->AddChild (new HeatherBlock ($FirstLine));
	}
/*
	public function PushLine (HeatherLine $Line) {
		if (($Line instanceof HeatherLineSpecial)) {
			switch ($Line->Identity) {
				case 'Empty':
					if ((! $this->NoLastChild ()) and $this->LastChild instanceof HeatherBlockCode) $this->LastChild->CleanEmpty ();
					$this->UnlinkLastChild ();
				break;
				case 'Code': $this->AddChild (new HeatherBlockCode ($Line->Data)); break;
				case 'Quote': case 'Dialogue':
					$this->AddChild (new HeatherBlock ($Line->Identity));
					$this->LastChild->AddLine ($Line);
				break;
			}
		} else {
			if ($this->NoLastChild () or ($this->LastChild instanceof HeatherBlockCode and ! ($Line instanceof HeatherLineCode))) $this->AddChild (new HeatherBlock ());
			$this->LastChild->AddLine ($Line);
		}
	}
*/


	public function AddString ($String) {
		if (! $this->IsEmptyString ($String)) {
			if ($this->NoLastChild ()) {
				$this->NewBlock ($String);
			} else call_user_func (array ($this->LastChild, __FUNCTION__), $String);
		} else $this->UnlinkLastChild ();
	}

/*
	public function PopBlock () {
		if ($this->NoLastChild () or ! count ($this->Children)) return (NULL);
		$this->UnlinkLastChild ();
		return (array_pop ($this->Children));
	}
*/
} ?>